<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('labors', function (Blueprint $table) {
            $table->id();
            $table->unsignedBigInteger('company_id')->default(0)->index();
            $table->unsignedBigInteger('admin_id')->default(0)->index();
            $table->unsignedBigInteger('project_id')->default(0)->index();
            $table->string('name')->nullable()->comment('姓名');
            $table->string('work')->nullable()->comment('工种');
            $table->string('age')->nullable()->comment('年龄');
            $table->string('mobile')->nullable()->comment('联系电话');
            $table->string('id_card')->nullable()->comment('身份证号码');
            $table->string('photo')->nullable()->comment('照片');
            $table->string('sex')->nullable()->comment('性别');
            $table->string('address')->nullable()->comment('联系地址');
            $table->string('home_address')->nullable()->comment('家庭住址');
            $table->date('birth')->nullable()->comment('出生日期');
            $table->string('nationality')->nullable()->comment('民族');
            $table->string('modality')->nullable()->comment('用工形式');
            $table->string('emergency_contact')->nullable()->comment('紧急联系人');
            $table->string('emergency_mobile')->nullable()->comment('紧急联系人电话');
            $table->string('wx')->nullable()->comment('本人微信号');
            $table->string('zfb')->nullable()->comment('支付宝账号');
            $table->string('bank')->nullable()->comment('银行名称');
            $table->string('bank_number')->nullable()->comment('卡号');
            $table->string('line_number')->nullable()->comment('联行号');
            $table->string('bank_deposit')->nullable()->comment('开户银行');
            $table->string('third_edu')->nullable()->comment('三级教育上传');
            $table->string('paper_file')->nullable()->comment('建筑施工作业人员安全生产知识教育培训考核试券');
            $table->string('id_card_personal')->nullable()->comment('身份证正人像');
            $table->string('id_card_emblem')->nullable()->comment('身份证正国徽');
            $table->string('remarks')->nullable()->comment('备注');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('labors');
    }
};
